#nullable enable

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using PHMEE.DTOS.Diagnosis;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace PHMEE.IServices.Diagnosis;

public interface IAlarmRecordAppService : IApplicationService
{
    Task<PagedResultDto<AlarmRecordBriefDto>> GetListAsync(Guid vesselId, AlarmRecordListFilterDto input);
    
    Task<AlarmRecordDetailDto> GetDetailAsync(Guid id);
    
    Task<AlarmRecordAckStatusDto> GetAckStatusAsync(Guid id);
    
    Task SetAckStatusAsync(AlarmRecordAckStatusSetDto input);

    Task<AlarmDiagReportDto> GetAlarmDiagReportAsync(Guid id);

    /// <summary>
    /// 获取指定机组的最新未被确认的报警记录集合（5 条）
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="unitId"></param>
    /// <returns></returns>
    Task<IEnumerable<AlarmRecordRealtimeDto>> GetLatestUnAckedAlarmRecordsAsync(Guid vesselId, Guid unitId);

    /// <summary>
    /// 获取指定机组 Id 列表中所有机组的振动未被 Ack 的报警 + Ams 开关量报警的数量，并按机组分组返回
    /// </summary>
    /// <param name="vesselId"></param>
    /// <returns></returns>
    Task<List<RealTimeUnitsAlarmCountDto>> GetRealTimeUnitsAlarmCountAsync(Guid vesselId);
}